!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("site-consent-policy",[],t):"object"==typeof exports?exports["site-consent-policy"]=t():e["site-consent-policy"]=t()}("undefined"!=typeof self?self:this,(()=>(()=>{"use strict";var e={r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t);var i={};function n(){const e="undefined"!=typeof $wixContext&&$wixContext.initWixModules?$wixContext.initWixModules:void 0!==globalThis.__wix_context__&&globalThis.__wix_context__.initWixModules?globalThis.__wix_context__.initWixModules:void 0;if(e)return{initWixModules:(t,i)=>o((()=>e(t,i))),fetchWithAuth(){throw new Error("fetchWithAuth is not available in this context")},graphql(){throw new Error("graphql is not available in this context")}};const t="undefined"!=typeof $wixContext?$wixContext.client:void 0!==i.client?i.client:void 0!==globalThis.__wix_context__?globalThis.__wix_context__.client:void 0,n="undefined"!=typeof $wixContext?$wixContext.elevatedClient:void 0!==i.elevatedClient?i.elevatedClient:void 0!==globalThis.__wix_context__?globalThis.__wix_context__.elevatedClient:void 0;return t||n?{initWixModules(e,i){if(i){if(!n)throw new Error("An elevated client is required to use elevated modules. Make sure to initialize the Wix context with an elevated client before using elevated SDK modules");return o((()=>n.use(e)))}if(!t)throw new Error("Wix context is not available. Make sure to initialize the Wix context before using SDK modules");return o((()=>t.use(e)))},fetchWithAuth:(e,i)=>{if(!t)throw new Error("Wix context is not available. Make sure to initialize the Wix context before using SDK modules");return t.fetchWithAuth(e,i)},getAuth(){if(!t)throw new Error("Wix context is not available. Make sure to initialize the Wix context before using SDK modules");return t.auth},async graphql(e,i,n){if(!t)throw new Error("Wix context is not available. Make sure to initialize the Wix context before using SDK modules");return t.graphql(e,i,n)}}:void 0}function o(e){const t=globalThis.__wix_context__,n={client:i.client,elevatedClient:i.elevatedClient};let o;globalThis.__wix_context__=void 0,i.client=void 0,i.elevatedClient=void 0,"undefined"!=typeof $wixContext&&(o={client:$wixContext?.client,elevatedClient:$wixContext?.elevatedClient},delete $wixContext.client,delete $wixContext.elevatedClient);try{return e()}finally{globalThis.__wix_context__=t,i.client=n.client,i.elevatedClient=n.elevatedClient,"undefined"!=typeof $wixContext&&($wixContext.client=o.client,$wixContext.elevatedClient=o.elevatedClient)}}return(()=>{var e;const t=decodeURIComponent((null==(e=document.getElementById("site-consent-policy"))?void 0:e.dataset.defaultConsentPolicy)??"");let i;try{i=t?JSON.parse(t):void 0}catch(e){console.log("[site-consent-policy] failed to parse the default consent policy",t)}var o;window.consentPolicyManager?null==(o=window.consentPolicyManager)||o.init({consentPolicy:i,baseUrl:document.location.origin},(()=>(async()=>{var e,t;const i=await(null==(e=n())?void 0:e.getAuth().getAuthHeaders({}));return(null==i||null==(t=i.headers)?void 0:t.Authorization)??""})())):console.log("[site-consent-policy] consentPolicyManager is not defined",window.consentPolicyManager)})(),t})())); //# sourceMappingURL=site-consent-policy.umd.min.js.map